#!/bin/bash
set -e

cd "$(
  cd "$(dirname "$0")" >/dev/null 2>&1
  pwd -P
)/" || exit
thrift --gen cpp thrift/tutorial.thrift
cd server
rm -rf build && mkdir build
cd build
export LD_LIBRARY_PATH=/Users/han/Downloads/thrift-0.15.0/lib/cpp/.libs:$LD_LIBRARY_PATH
cmake ..
make
#cd ../client
#rm -rf build && mkdir build
#cd build
#cmake ..
#make